package cn.edu.scau.cmi.shishuai.client;

import org.springframework.context.ApplicationContext;

import cn.edu.scau.cmi.shishuai.spring.domain.Student;
import cn.edu.scau.cmi.shishuai.spring.domain.Teacher;
import cn.edu.scau.cmi.shishuai.spring.util.ApplicationContextUtil;

public class SpringClient_1 {

	public static void main(String[] args) throws Exception {
		
		ApplicationContext aContext = ApplicationContextUtil.getApplicationContext();

		Student zs = (Student) aContext.getBean("zhangsan", Student.class);
		Teacher ll = (Teacher) aContext.getBean("liangzaoqing", Teacher.class);
		System.out.println(zs.getName() + "的毕业设计指导老师是:" + ll.getName());
	}

}
